using System;
using FluentNHibernate.Mapping;
using Kollektiv.DB.NHibernate;

namespace Kollektiv.DataModel.NHibernate
{
	public abstract class ContentMap<T>:DataObjectMap<T> where T : Content
	{
		public ContentMap ():base()
		{
			References (x => x.Language).Not.Nullable ();
			Map (x => x.Title).Not.Nullable ();
			Map (x => x.Text).Not.Nullable ();
			HasMany (x => x.Attachments).Cascade.All ();
		}
	}
}

